var ScrambledEggs;
(function (ScrambledEggs) {
    (function (Utility) {
        var General = (function () {
            function General() { }
            General.Clone = function Clone(obj) {
                return $.extend(true, {
                }, obj);
            };
            General.OptionBox = function OptionBox(content) {
                var options = [];
                for (var _i = 0; _i < (arguments.length - 1); _i++) {
                    options[_i] = arguments[_i + 1];
                }
                var optionBox = $("#optionbox").show();
                var optionContainer = optionBox.find(".options").html("");
                optionBox.find(".content").html(content);
                $.each(options, function () {
                    var option = this;
                    $("<button />").html(option.Content).appendTo(optionContainer).click(function () {
                        optionBox.hide();
                        option.Action();
                    });
                });
                optionBox.find(".options");
            };
            General.YesNoBox = function YesNoBox(content, whenYes, whenNo) {
                General.OptionBox(content, {
                    Content: "Yes",
                    Action: whenYes
                }, {
                    Content: "No",
                    Action: whenNo
                });
            };
            General.InfoBox = function InfoBox(content, okCaption, onOk) {
                if (typeof okCaption === "undefined") { okCaption = "Ok"; }
                if (typeof onOk === "undefined") { onOk = $.noop; }
                General.OptionBox(content, {
                    Content: okCaption,
                    Action: onOk
                });
            };
            return General;
        })();
        Utility.General = General;        
    })(ScrambledEggs.Utility || (ScrambledEggs.Utility = {}));
    var Utility = ScrambledEggs.Utility;
})(ScrambledEggs || (ScrambledEggs = {}));
